<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>构造函数</title>
    <script>
        function Fun(name,age,sex,yo,say){
            this.name=name;
            this.age=age;
            this.sex=sex;
            this.yo=yo;
            this.say=say;
            this.show=function(){
                console.log(this.name+" 今年"+this.age+"岁,性别 "+this.sex+" "+this.yo+" 还会"+this.say);
            }
        }
        var fun1=new Fun("小明","18","男","有男朋友","say English");
        fun1.show();
    </script>
</head>
<body>

</body>
</html>